package com.design.alex.command;

/**
 * @ClassName : CommandPatternDemo
 * @Description : todo
 * @Author : Alex
 * @Date: 2020-02-18 11:49
 */
public class CommandPatternDemo {
    public static void main(String[] args) {
        Stock abcStock = new Stock();

        BuyStock buyStock = new BuyStock(abcStock);
        SellStock sellStock = new SellStock(abcStock);

        Broker broker = new Broker();
        broker.takeOrder(buyStock);
        broker.takeOrder(sellStock);

        broker.placeOrders();
    }
}
